home *** CD-ROM | disk | FTP | other *** search
/ Sound Fx / Sound Fx.iso / Software / UNZIPED / MPW181-5 / _SETUP.1 / indigo_obuffer.h < prev    next >
Encoding:
C/C++ Source or Header  |  1997-04-21  |  1.6 KB  |  62 lines

  1. /* indigo_obuffer.h
  2.  
  3.     Obuffer for Silicon Graphics Indigo written by
  4.    Tobias Bading (bading@cs.tu-berlin.de)
  5.  
  6.    This program is free software; you can redistribute it and/or modify
  7.    it under the terms of the GNU General Public License as published by
  8.    the Free Software Foundation; either version 2 of the License, or
  9.    (at your option) any later version.
  10.  
  11.    This program is distributed in the hope that it will be useful,
  12.    but WITHOUT ANY WARRANTY; without even the implied warranty of
  13.    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  14.    GNU General Public License for more details.
  15.  
  16.    You should have received a copy of the GNU General Public License
  17.    along with this program; if not, write to the Free Software
  18.    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
  19.  
  20. #ifndef INDIGO_OBUFFER_H
  21. #define INDIGO_OBUFFER_H
  22.  
  23. #ifdef IRIX
  24.  
  25. #include <iostream.h>
  26. #include <unistd.h>
  27. #include <stdlib.h>
  28. #include <sys/time.h>
  29.  
  30. extern "C" {
  31. #include <audio.h>
  32. }
  33.  
  34. #include "args.h"
  35. #include "obuffer.h"
  36.  
  37. // a class for direct sound output on SGI machines:
  38. class IndigoObuffer : public Obuffer
  39. {
  40. private:
  41.   int16 buffer[OBUFFERSIZE];
  42.   int16 *bufferp[MAXCHANNELS];
  43.   uint32 channels;
  44.   ALport port;
  45.  
  46. public:
  47.     IndigoObuffer (uint32 number_of_channels, MPEG_Args *maplay_args);
  48.        ~IndigoObuffer (void);
  49.   void    append (uint32 channel, int16 value);
  50.   void    write_buffer (int dummy);
  51.  
  52. #ifdef SEEK_STOP
  53.   void clear_buffer(void);
  54.   void set_stop_flag(void);
  55. #endif // SEEK_STOP
  56.  
  57. };
  58. #endif    // IRIX
  59.  
  60. #endif // INDIGO_OBUFFER_H
  61.  
  62.